# todo: 输入一个字符串，打印出该字符串中字符的所有排列，可以以任意顺序返回这个字符串数组，但里面不能有重复元素。
#  输入: s = "abc"
#  输出: ["abc","acb","bac","bca","cab","cba"]
import itertools

def permute(s):
    result = set()
    for perm in itertools.permutations(s):
        result.add(''.join(perm))
    return list(result)


# 示例调用
s = "abc"
print(permute(s))
